package com.lxit.controller;

import com.lxit.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

@RestController
@RequestMapping("/admin")
public class AdminControllor {

    @Autowired
    LoginService loginService;

    @RequestMapping("/login")
    public String login(String name, String pass, int usertype) {
        System.out.println("username:" + name);
        System.out.println("password:" + pass);
        boolean result = loginService.login(name, pass, usertype);
        return "login";
    }
}
